home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / game / patch / WHDIGamesA-B.lzh / AnotherWorld.lha / AnotherWorld / Install < prev    next >
Text File  |  1998-06-02  |  3KB  |  150 lines

  1. ;****************************
  2.  
  3. (set #sub-dir "")        ;sub directory containing data files
  4. (set #readme-file "Readme")    ;name of readme file
  5. (set #cleanup "")        ;files to delete after install
  6.  
  7. ;****************************
  8.  
  9. ;----------------------------
  10. ; Checks if given program is reachable via the path
  11. ; if not abort install
  12. ; IN:  #program - to check
  13. ; OUT: -
  14.  
  15. (procedure P_chkrun
  16.   (if
  17.     (= 0 (run ("cd SYS:\nWhich %s" #program)))
  18.     ("")
  19.     (abort ("You must install \"%s\" first !\nIt must be accessible via the path.\nYou can find it in the whdload package." #program))
  20.   )
  21. )
  22.  
  23. (set #program "WHDLoad")
  24. (P_chkrun)
  25.  
  26. (set #program "Patcher")
  27. (P_chkrun)
  28.  
  29.  
  30. ;****************************
  31.  
  32. (if
  33.   (exists #readme-file)
  34.   (if 
  35.     (= 0 (run ("SYS:Utilities/Multiview %s" #readme-file)))
  36.     ("")
  37.     (run ("SYS:Utilities/More %s" #readme-file))
  38.   )
  39. )
  40.  
  41. (set @default-dest
  42.   (askdir
  43.     (prompt ("Where should \"%s\" installed ?\nA drawer \"%s\" will automatically created." @app-name @app-name))
  44.     (help @askdir-help)
  45.     (default @default-dest)
  46.     (disk)
  47.   )
  48. )
  49. (set #dest (tackon @default-dest @app-name))
  50. (if
  51.   (exists #dest)
  52.   (
  53.     (set #choice
  54.       (askbool
  55.         (prompt ("\nDirectory \"%s\" already exists.\n Should it be deleted ?" #dest))
  56.         (default 1)
  57.         (choices "Delete" "Skip")
  58.         (help @askbool-help)
  59.       )
  60.     )
  61.     (if
  62.       (= #choice 1)
  63.       (run ("Delete \"%s\" \"%s.info\" All" #dest #dest))
  64.     )
  65.   )
  66. )
  67. (makedir #dest
  68.   (help @makedir-help)
  69.   (infos)
  70. )
  71.  
  72. ;----------------------------
  73.  
  74. (copyfiles
  75.   (help @copyfiles-help)
  76.   (source ("%s.slave" @app-name))
  77.   (dest #dest)
  78. )
  79. (copyfiles
  80.   (help @copyfiles-help)
  81.   (source ("OSEMUMODULE400.BIN"))
  82.   (dest #dest)
  83. )
  84. (copyfiles
  85.   (help @copyfiles-help)
  86.   (source ("%s.inf" @app-name ))
  87.   (newname ("%s.info" @app-name ))
  88.   (dest #dest)
  89. )
  90. (if
  91.   (exists #readme-file)
  92.   (
  93.     (copyfiles
  94.       (help @copyfiles-help)
  95.       (source #readme-file)
  96.       (dest #dest)
  97.     )
  98.     (copyfiles
  99.       (help @copyfiles-help)
  100.       (source ("%s.info" #readme-file))
  101.       (dest #dest)
  102.     )
  103.   )
  104. )
  105. (if
  106.   (= #sub-dir "")
  107.   ("")
  108.   (
  109.     (set #dest (tackon #dest #sub-dir))
  110.     (makedir #dest
  111.       (help @makedir-help)
  112.     )
  113.   )
  114. )
  115.  
  116. ;----------------------------
  117.  
  118. (working "Please insert your Another World disk 1 in any drive.")
  119. (
  120.   (set #AD_disk "Disk1")
  121.   (copyfiles
  122.     (help @copyfiles-help)
  123.     (source ("%s:" #AD_disk))
  124.     (dest #dest)
  125.     (pattern "(another|bank#?)")
  126.   )
  127. )
  128.  
  129. (working "Please insert your Another World disk 2 in any drive.")
  130. (
  131.   (set #AD_disk "Disk2")
  132.   (copyfiles
  133.     (help @copyfiles-help)
  134.     (source ("%s:" #AD_disk))
  135.     (dest #dest)
  136.     (pattern "(bank03|bank04|bank07|bank08|bank0a)")
  137.   )
  138. )
  139.  
  140. (run ("Assign \"ToPatch:\" \"%s\"" #dest))
  141. (run ("Patcher -p%s.param" @app-name))
  142. (run ("Assign \"ToPatch:\" Remove"))
  143.  
  144. ;----------------------------
  145.  
  146. (run ("Delete %s ALL QUIET FORCE" #cleanup))
  147.  
  148. (exit)
  149.  
  150.